
from stock.Analyse.analyse import StockAnalyseBase
from stock.Analyse.analyse import StockAnalyseBefore
from stock.Analyse.analyse import StockAnalyseToday
from stock.Analyse.a_news import StockAnalyseNews
from stock.Analyse.analyse import StockAnalyseCompany

def analyse_before_days():
    stockBefore = StockAnalyseBefore("before170119days")
    if stockBefore == None:
        print("exit")
        exit(1)
        # stockBefore.analyse()
        # stockBefore.debug_indus()

def analyse_stock_base():
    stockBase = StockAnalyseBase()
    stockBase.address("companies")
    stockBase.data_print("industry")

def analyse_stock_news():
    stockNews = StockAnalyseNews()
    stockNews.news(20)
    stockNews.print_news()

def analyse_stock_company():
    print("Test from company")
    stockCompany = StockAnalyseCompany()
    stockCompany.load_data("companies.json")
    stockCompany.parse()
    stockCompany.out()

if __name__ == "__main__":
    # analyse_before_days()
    # analyse_stock_base()
    # analyse_stock_news()
    # ana = StockAnalyseToday()
    # ana.loaddata("20170929")
    # out = ana.statistics()
    # print(out)
    analyse_stock_company()